//
//  SouceModel.swift
//  WeatherDemo
//
//  Created by 张峰 on 15/3/4.
//  Copyright (c) 2015年 wdlgame. All rights reserved.
//

import UIKit

class CityAir: NSObject {
    
    var aqi  = 0
    var area = ""
    var pm2_5 = 0
    var pm2_5_24h = 0
    var quality = ""
    var time = ""
    
    init(object: AnyObject) {
        super.init()
        
        let json = JSON(object)
        self.pm2_5 = json["PM2.5"].intValue
        self.pm2_5_24h = json["PM10"].intValue
        self.quality = json["quality"].stringValue
        self.time = json["time"].stringValue
        
    }
    
    func arrayWithList(list: [AnyObject]) -> [CityAir] {
        
        var souceArr = [CityAir]()
        for object in list {
            var model = CityAir(object: object)
            souceArr.append(model)
        }
        
        return souceArr
    }
}
